home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-05 | 10.5 KB | 272 lines | [TEXT/MPS ] |
- #------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # MultiFinder-Aware Sample Application
- #
- # Program: DTS.Draw
- # File: DTS.Draw.make - Make Source
- #
- # Copyright © 1988-1994 Apple Computer, Inc.
- # All rights reserved.
- #
- #------------------------------------------------------------------------------
-
- # The are three possible ways of making DTS.Draw with this makefile
- # 1) 68K only
- # 2) PowerPC only
- # 3) "Fat" - both 68K and PowerPC
- # You can control which gets build using the dependency line for "AppName"
- # The default is to build the fat version. See instructions below.
- AppName = 'DTS.Draw'
- Signature = 'DTSD'
-
- DTS.Lib.folder = "::DTS.Lib:"
- DTS.Lib.hdrs = "::DTS.Lib:DTS.Lib.headers:"
- projsrc = :
- obj = :OBJECT:
- objppc = :OBJECTPPC:
-
- #------------------------------------------------------------------------------
- # Options for our compilers:
- # -sym on: tells the compilers and linker to emit symbol information for
- # a source level debugger, such as SADE.
- # -i {DTS.Lib.hdrs}: means to look for any #include files in the specified
- # directory, as well as the normal set.
- # -r: tells the C compiler to require function prototypes.
- # -mbg off: tells the compilers to not emit low-level debugger names. This
- # saves on file space, but you may wish to remove this option if you
- # need to debug with something like Macsbug.
- # -rd: for Rez means to suppress warnings for redeclared types (we redeclare
- # 'RECT' because it’s not included in MPW 3.0).
- # -append: means to add the resources to the target file, rather than
- # deleting all the ones that are there first.
- # -d Signature...: is a way of passing our application's signature to Rez.
- # With this mechanism, we can define our signature here, and export
- # it to Rez, so that we don't have to declare it there, too.
- # -sn STDCLIB=Main: puts all the routines that would normally go into the
- # STDCLIB segment into the Main segment. This is done so that when we
- # call upon any low-level utilities, we don't potentially move memory
- # by loading in a segment.
- #------------------------------------------------------------------------------
-
- # SymOptions and OptOptions are mutually exclusive. Enable as appropriate
- SymOptions = -sym on # turn this on to debug with SADE/R2Db
- COptOptions = #-opt on
- PPCCOptOptions = #-opt speed
-
- # CIncludesFolder needs to be set to your Universal Interfaces folder
- CIncludesFolder = -i "{PPCCIncludes}"
- IncludesFolders = -i {DTS.Lib.hdrs}
- COptions = {IncludesFolders} {CIncludesFolder} {SymOptions} {COptOptions} -r -mbg on
- PPCCOptions = {IncludesFolders} {SymOptions} {PPCCOptOptions} -w conformance -appleext on
- RezOptions = {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName='"DTS.Draw"'
- LinkOptions = {SymOptions} {SegmentMappings} -msg nodup
- LinkOptionsPPC = {SymOptions} -main main
- MakeSymOptions = -i {DTS.Lib.folder} -r
- # The -w options for MakePef makes those libraries "weak" imports, meaning
- # they can be absent at runtime. The app must check before calling them.
- MakePefOptions = -l QuickTimeLib.xcoff=QuickTimeLib~ ∂
- -w QuickTimeLib:AddMovieResource ∂
- -w QuickTimeLib:ClearMovieChanged ∂
- -w QuickTimeLib:CloseMovieFile ∂
- -w QuickTimeLib:CreateMovieFile ∂
- -w QuickTimeLib:DisposeMovie ∂
- -w QuickTimeLib:EnterMovies ∂
- -w QuickTimeLib:GetMoviesError ∂
- -w QuickTimeLib:NewMovie ∂
- -w QuickTimeLib:NewMovieFromFile ∂
- -w QuickTimeLib:OpenMovieFile ∂
- -w QuickTimeLib:StandardGetFilePreview ∂
- -w QuickTimeLib:UpdateMovieResource ∂
- -l DragLib.xcoff=DragLib~ ∂
- -w DragLib:AddDragItemFlavor ∂
- -w DragLib:CountDragItems ∂
- -w DragLib:DisposeDrag ∂
- -w DragLib:GetDragAttributes ∂
- -w DragLib:GetDragItemReferenceNumber ∂
- -w DragLib:GetDragModifiers ∂
- -w DragLib:GetDragMouse ∂
- -w DragLib:GetDragOrigin ∂
- -w DragLib:GetDropLocation ∂
- -w DragLib:GetFlavorData ∂
- -w DragLib:GetFlavorDataSize ∂
- -w DragLib:GetFlavorFlags ∂
- -w DragLib:HideDragHilite ∂
- -w DragLib:InstallReceiveHandler ∂
- -w DragLib:InstallTrackingHandler ∂
- -w DragLib:NewDrag ∂
- -w DragLib:RemoveReceiveHandler ∂
- -w DragLib:RemoveTrackingHandler ∂
- -w DragLib:ShowDragHilite ∂
- -w DragLib:SetDragItemBounds ∂
- -w DragLib:TrackDrag ∂
- -l InterfaceLib.xcoff=InterfaceLib
- SegmentMappings = -sn INTENV=Main ∂
- -sn PASLIB=Main ∂
- -sn STDCLIB=Main ∂
- -sn SANELIB=Main ∂
- -sn StringUtils=Main ∂
- -sn UtilMain=Main
-
- #------------------------------------------------------------------------------
- # These are modified default build rules. This is necessary to take into
- # account differences between MPW 3.1 and 3.2
- #------------------------------------------------------------------------------
- {obj} ƒ {projsrc}
-
- .c.o ƒ .c
- {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
- {objppc} ƒ {projsrc}
-
- .o ƒ .c
- PPCC {PPCCOptions} {DepDir}{Default}.c -o {TargDir}{Default}.o
-
- #------------------------------------------------------------------------------
- # These are the objects that we want to link with. If any one of these
- # changes, then we invoke the Link command.
- #------------------------------------------------------------------------------
- AppObjects = ∂
- {obj}Clipboard.c.o ∂
- {obj}Colors.c.o ∂
- {obj}DoEvent.c.o ∂
- {obj}Drag.c.o ∂
- {obj}EventLoop.c.o ∂
- {obj}File.c.o ∂
- {obj}IdleTasks.c.o ∂
- {obj}Menu.c.o ∂
- {obj}PenSizeDialog.c.o ∂
- {obj}Start.c.o ∂
- {obj}TExtSelectObj.c.o ∂
- {obj}TGroupObj.c.o ∂
- {obj}TLineObj.c.o ∂
- {obj}ToolPalette.c.o ∂
- {obj}TOvalObj.c.o ∂
- {obj}TPieObj.c.o ∂
- {obj}TRectObj.c.o ∂
- {obj}TreeObj2.c.o ∂
- {obj}TRootObj.c.o ∂
- {obj}TRRectObj.c.o ∂
- {obj}Window.c.o ∂
- {obj}WindowDialog.c.o ∂
- {obj}WindowPalette.c.o
-
- AppObjectsPPC = ∂
- {objppc}Clipboard.o ∂
- {objppc}Colors.o ∂
- {objppc}DoEvent.o ∂
- {objppc}Drag.o ∂
- {objppc}EventLoop.o ∂
- {objppc}File.o ∂
- {objppc}IdleTasks.o ∂
- {objppc}Menu.o ∂
- {objppc}PenSizeDialog.o ∂
- {objppc}Start.o ∂
- {objppc}TExtSelectObj.o ∂
- {objppc}TGroupObj.o ∂
- {objppc}TLineObj.o ∂
- {objppc}ToolPalette.o ∂
- {objppc}TOvalObj.o ∂
- {objppc}TPieObj.o ∂
- {objppc}TRectObj.o ∂
- {objppc}TreeObj2.o ∂
- {objppc}TRootObj.o ∂
- {objppc}TRRectObj.o ∂
- {objppc}Window.o ∂
- {objppc}WindowDialog.o ∂
- {objppc}WindowPalette.o
-
- #------------------------------------------------------------------------------
- # These help define the libraries that we want to link with. {AppObjects} holds
- # the names of the application units we want to link together. {Libs68K} and
- # {LibsPPC} hold the DTS.Lib and System library files we need to link with.
- #------------------------------------------------------------------------------
- Libs68K = ∂
- "{Libraries}Runtime.o" ∂
- "{DTS.Lib.folder}DTS.Lib_controls" ∂
- "{DTS.Lib.folder}DTS.Lib_ctlhandler" ∂
- "{DTS.Lib.folder}DTS.Lib_framework" ∂
- "{DTS.Lib.folder}DTS.Lib_strings" ∂
- "{DTS.Lib.folder}DTS.Lib_treeobj" ∂
- "{DTS.Lib.folder}DTS.Lib_utils" ∂
- "{Libraries}Interface.o"
-
- LibsPPC = ∂
- "{DTS.Lib.folder}DTS.Lib_controls.PPC" ∂
- "{DTS.Lib.folder}DTS.Lib_ctlhandler.PPC" ∂
- "{DTS.Lib.folder}DTS.Lib_framework.PPC" ∂
- "{DTS.Lib.folder}DTS.Lib_strings.PPC" ∂
- "{DTS.Lib.folder}DTS.Lib_treeobj.PPC" ∂
- "{DTS.Lib.folder}DTS.Lib_utils.PPC" ∂
- "{PPCLibraries}"QuickTimeLib.xcoff ∂
- "{PPCLibraries}"DragLib.xcoff ∂
- "{PPCLibraries}"InterfaceLib.xcoff ∂
- "{PPCLibraries}"PPCCRuntime.o
-
-
- #------------------------------------------------------------------------------
- # Dependencies for the individual components. These will invoke the
- # default build rules listed in Chapter 9 of the MPW 3.0 manual.
- # You may wish to reduce the number of dependencies. Two dependencies
- # you may wish to remove are this makefile and the .protos file.
- # For the .protos file, if you add a function to the list of
- # functions in .protos, you will cause all the source files to be
- # recompiled. This may be more than you want to wait for each time you
- # add a function to your application. On the other hand, if you do not
- # include this in the dependencies, and you change the parameters for a
- # function, and make the respective change to .protos, any files
- # that reference that function will not be recompiled. If these files are
- # recompiled, the prototype checking will catch any cases where you did
- # not change the way the altered function was called. <<You choose>>
- #------------------------------------------------------------------------------
-
- {AppObjects} ƒ #{AppName}.make ∂
- # App.h ∂
- # App.protos.h
-
- # This rule controls how the final app is built.
- # By depending on both App68K and AppPPC, the "fat" version
- # gets built. To build 68K only or PowerPC only, remove the other
- # dependency.
- {AppName} ƒƒ AppRez App68K AppPPC
- SetFile {AppName} -t APPL -c {Signature} -a B
-
- #------------------------------------------------------------------------------
- # Build rule that links our application together. If any of our objects
- # changes, or this makefile changes, then we relink. The dummy prerequisite
- # ShellForce must come before any other prerequisites for {AppName}
- #------------------------------------------------------------------------------
-
- App68K ƒ {AppObjects}
- Link {LinkOptions} -o {AppName} {AppObjects} {Libs68K}
- Rez {RezOptions} AppCfrg.r -o {AppName}
-
- #------------------------------------------------------------------------------
- # Build rule that creates our resources and adds them to the application
- #------------------------------------------------------------------------------
-
- AppRez ƒ {AppName}.make ∂
- DTS.Draw.r ∂
- AppCfrg.r ∂
- App.h
- Rez {RezOptions} DTS.Draw.r AppCfrg.r -o {AppName}
-
- #------------------------------------------------------------------------------
- # Rules to build the PowerPC part
- #------------------------------------------------------------------------------
- AppPPC ƒ {AppName}.pef
-
- {AppName}.xcoff ƒ {AppObjectsPPC}
- PPCLink {LinkOptionsPPC} {AppObjectsPPC} {LibsPPC} -o {AppName}.xcoff
-
- # MakeSym is very timeconsuming, so we only do it if we really need it
- {AppName}.xSYM ƒ {AppName}.xcoff
- IF "{SymOptions}" != "" && "{SymOptions}" != "-sym off"
- MakeSym {MakeSymOptions} {AppName}.xcoff -o {AppName}.xSYM
- END
-
- {AppName}.pef ƒ {AppName}.xcoff {AppName}.xSYM
- MakePef {MakePefOptions} {AppName}.xcoff -o {AppName}
- Rez {RezOptions} -d powerc AppCfrg.r -o {AppName}
-